package com.itc.bpm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itc.bpm.bean.BpmProcessTaskExt;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 流程任务实例控制信息表
 */
public interface BpmProcessTaskExtMapper extends BaseMapper<BpmProcessTaskExt> {
    @Select("select * from bpm_process_task_ext where task_id=#{taskId}")
    BpmProcessTaskExt selectTaskExtByTaskId(@Param("taskId") String taskId);

    @Select("select * from bpm_process_task_ext where process_instance_id=#{processInstanceId} and is_circulate=1 and (status=0 or status=1)")
    List<BpmProcessTaskExt> findCirculateTasks(@Param("processInstanceId") String processInstanceId);
}
